﻿using Grow.Domain.Object;
using Grow.Domain.Repository.CreateDomainRepository;
using Microsoft.EntityFrameworkCore;

namespace Grow.Repository.EntityFrameworkCore.CreateRepository
{
    public class DbBuilder : IDbBuilder
    {
        private readonly ModelBuilder _modelBuilder;
        public DbBuilder(ModelBuilder modelBuilder)
        {
            _modelBuilder = modelBuilder;
        }

        public IEntityBuilder<TEntity> GetEntityBuilder<TEntity>() where TEntity : class, IEntity
        {
            return new EntityBuilder<TEntity>(_modelBuilder);
        }
    }
}
